package com.imooc.quartzDemo.job;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public class NewJob implements BaseJob  {
    private static Logger log = LoggerFactory.getLogger(NewJob.class);
    public NewJob() { }
    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        Date date=new Date();
        DateFormat format=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        log.info("New Job执行时间:"+ format.format(date));
    }
}
